﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using UCenter.Core.Web;
using UCenter.Services;

namespace UCenter.Controllers
{
    [HandleError]
    public class HomeController : BaseController {
        #region index
        public ActionResult Index()
        {
            ViewData["Title"] = "主页";
            ViewData["User"] = ContextService.Current.User;
            return View();
        }

        public string SetStatus(string status) {
            new AccountService().SetStatus(ContextService.Current.User.ID, status);
            ContextService.Current.User.StatusSetting = status;
            ContextService.Current.User.UpdateStatusTime = DateTime.Now;
            return status;
        }
        #endregion

        public ActionResult Contact()
        {
            ViewData["Title"] = "联系方式";
            return View();
        }

        public ActionResult Privacy()
        {
            ViewData["Title"] = "隐私保护";
            return View();
        }

        public ActionResult Feedback()
        {
            ViewData["Title"] = "意见反馈";
            return View();
        }

        public ActionResult Help()
        {
            ViewData["Title"] = "帮助中心";
            return View();
        }

        public ActionResult About()
        {
            ViewData["Title"] = "关于我们";
            return View();
        }
    }
}
